﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace AopTest2.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class WeatherForecastController : ControllerBase
    {
       
        private readonly ILogger<WeatherForecastController> _logger;

       private readonly  IBaseService.ITimeService _timeService;

        public WeatherForecastController(ILogger<WeatherForecastController> logger,IBaseService.ITimeService timeService)
        {
            _logger = logger;

            _timeService = timeService;

        }

        [HttpGet]
        public IActionResult Get()
        {
           
            var result = _timeService.ShowTime();

            return Ok(result);
        }
    }
}
